package joc.internal.transformer;

import javassist.CtBehavior;
import javassist.CtClass;
import javassist.Modifier;

public abstract class DeclaredBehaviorTransformer extends ClassTransformer {
	public DeclaredBehaviorTransformer(Transformer transformer) {
		super(transformer);
	}

	@Override
	public final void transform(CtClass clazz) throws Exception {
		for (CtBehavior behavior : clazz.getDeclaredBehaviors()) {
			if (!Modifier.isAbstract(behavior.getModifiers())) {
				transform(clazz, behavior);
			}
		}
	}
	
	public abstract void transform(CtClass clazz, CtBehavior behavior) throws Exception;
}
